package string;

public class SubstringDemo {
    public static void main(String[] args) {
        String str = "www.tedu.cn";
        int start = str.indexOf(".") + 1;//4
        int end = str.indexOf(".",start);//8
        String name = str.substring(start, end);
        System.out.println(name);
    }
}
